package com.kgc.skconsumer.controller;

import com.kgc.basic.util.ResponseMsg;
import com.kgc.collection.pojo.PaymentMethod;
import com.kgc.skconsumer.feign.PaymentMethodFeign;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/PaymentMethodController")
public class PaymentMethodController {

    private Logger logger = LoggerFactory.getLogger(PaymentMethodController.class);

    @Autowired
    private PaymentMethodFeign paymentMethodFeign;

    @RequestMapping("/selectPaymentMethod")
    public ResponseMsg selectPaymentMethod(){
        logger.info("PaymentMethodController selectPaymentMethod is start");
        ResponseMsg responseMsg = paymentMethodFeign.selectPaymentMethod();
        logger.debug("PaymentMethodController selectPaymentMethod is end return are {}", responseMsg);
        return responseMsg;
    }

    @RequestMapping("/selectCwOtherIncomePayname")
    public  ResponseMsg selectCwOtherIncomePayname(){
        logger.info("PaymentMethodController selectCwOtherIncomePayname is start");
        ResponseMsg responseMsg = paymentMethodFeign.selectCwOtherIncomePayname();
        logger.debug("PaymentMethodController selectCwOtherIncomePayname is end return are {}", responseMsg);
        return responseMsg;
    }


}
